package com.zmm.zebulon.starter.mq.redis.core.message;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * description: Redis 消息抽象基类
 *
 * @author zebulon
 * package com.zmm.zebulon.starter.mq.redis.core.message
 * name: AbstractRedisMessage
 * date 2024/1/7 15:49
 */
@Data
public abstract class AbstractRedisMessage {

    /**
     * 头
     */
    private Map<String, String> headers = new HashMap<>();

    public String getHeader(String key) {
        return headers.get(key);
    }

    public void addHeader(String key, String value) {
        headers.put(key, value);
    }

}

